import http from '@/utils/request'

//分页查询部门信息
export function findDeptByPage(params:any){
    return http.request({
        url:'/deps',
        method:'get',
        params
    })
}

//axios的修改操作
export function findById(id:any){
    return http.request({
        url:`/dep/${id}`,
        method:'get',
        
    })
}

export function updateById(id:any,data:any){
    return http.request({
        url:`/dep/${id}`,
        method:'put',
        data
    })
}


//新增axios的操作
export function insertDept(data:any){
    return http.request({
        url:'/dep',
        method:'post',
        data
    })
}





//删除部门axios
export function deleteById(id:any){
    return http.request({
        url:`/dep/${id}`,
        method:'delete',
        
    })
}


